package com.efast.dmom.mes.util;

public enum WmsOrderLogStatus {
	ADD("新增",1),
	UPDATE("编辑",2),
	CONFIRM("确认",3),
	DELETE("删除",4);

	private String operation;
	
	private int flag;

	public String getOperation() {
		return operation;
	}

	public void setOperation(String operation) {
		this.operation = operation;
	}

	public int getFlag() {
		return flag;
	}

	public void setFlag(int flag) {
		this.flag = flag;
	}

	private WmsOrderLogStatus(String operation, int flag) {
		this.operation = operation;
		this.flag = flag;
	}
	
	public String getOperationByFlag(int flag) {
		for (WmsOrderLogStatus item : WmsOrderLogStatus.values()) {
			int flag2 = item.getFlag();
			if (flag2 == flag) {
				return item.getOperation();
			}
		}
		return null;
	}

}
